package com.itheima.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebFilter("/*")
public class FilterDemo2 implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        //放行前
        System.out.println("2.FilterDemo...");

        chain.doFilter(request, response);

        //放行后
        System.out.println("4.FilterDemo...");
    }

    public void init(FilterConfig config) throws ServletException {
    }

    public void destroy() {
    }
}
